/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package serwer;

import java.net.ServerSocket;
import java.net.Socket;
import javax.swing.SwingWorker;

/**
 *
 * @author Marcin
 */
public class Listener extends SwingWorker <Void,Void>{

    private ServerSocket sS = null;
    
    @Override
    protected Void doInBackground() throws Exception {
        sS = new ServerSocket(Connection.SPORT);        
        while(true){
            Socket s = sS.accept();
            new Receiver(s).execute();
        }
    }
    
}
